<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\PollVotingHistory
 *
 * @ORM\Table(name="poll_voting_history")
 * @ORM\Entity
 */
class PollVotingHistory
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var datetime $createdAt
     *
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
     */
    private $createdAt;

    /**
     * @var bigint $ip
     *
     * @ORM\Column(name="ip", type="bigint", nullable=false)
     */
    private $ip;

    /**
     * @var Catalog\PollAnswers
     *
     * @ORM\ManyToOne(targetEntity="Catalog\PollAnswers")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="answer_id", referencedColumnName="id")
     * })
     */
    private $answer;

    /**
     * @var Catalog\PollQuestions
     *
     * @ORM\ManyToOne(targetEntity="Catalog\PollQuestions")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="question_id", referencedColumnName="id")
     * })
     */
    private $question;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set createdAt
     *
     * @param datetime $createdAt
     * @return PollVotingHistory
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
        return $this;
    }

    /**
     * Get createdAt
     *
     * @return datetime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set ip
     *
     * @param bigint $ip
     * @return PollVotingHistory
     */
    public function setIp($ip)
    {
        $this->ip = $ip;
        return $this;
    }

    /**
     * Get ip
     *
     * @return bigint 
     */
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * Set answer
     *
     * @param Catalog\PollAnswers $answer
     * @return PollVotingHistory
     */
    public function setAnswer(\Catalog\PollAnswers $answer = null)
    {
        $this->answer = $answer;
        return $this;
    }

    /**
     * Get answer
     *
     * @return Catalog\PollAnswers 
     */
    public function getAnswer()
    {
        return $this->answer;
    }

    /**
     * Set question
     *
     * @param Catalog\PollQuestions $question
     * @return PollVotingHistory
     */
    public function setQuestion(\Catalog\PollQuestions $question = null)
    {
        $this->question = $question;
        return $this;
    }

    /**
     * Get question
     *
     * @return Catalog\PollQuestions 
     */
    public function getQuestion()
    {
        return $this->question;
    }
}